<script type="text/javascript">
$(document).ready(function() {
	$("#all").click(function(){
				$("[name='disk_zh']").each(function(){
			if($(this).prop("checked")){     
    			$(this).prop("checked",false);     
         	}     
   			else{     
    			$(this).prop("checked",true);              
   			}        
		})
	})
})
</script>

<form action="/edit/{{id}}" method="POST" id="valid_form"> {% csrf_token %}
	<table class="table table-hover">
		<tbody>
			<tr>
				<th>level</th>
				<td>{{forms.level}}</td>
			</tr>
			<tr>
				<th>管理卡IP</th>
				<td>{{forms.ilo_ip}}</td>
			</tr>
			<tr>
				<th>管理卡子网掩码</th>
				<td>{{forms.ilo_netmask}}</td>
			</tr>
			<tr>
				<th>管理卡网关</th>
				<td>{{forms.ilo_gw}}</td>
			</tr>
			<tr>
				<td colspan=2 align="center" style="background-color: #ADADAD">分割线</td>
			</tr>
			<tr>
				<th>*业务IP*</th>
				<td>{{forms.service_ip}}</td>
			</tr>
			<tr>
				<th>选择业务网卡</th>
				<td>{{forms.eth}}</td>
			</tr>
			<tr>
				<th>业务子网掩码</th>
				<td>{{forms.service_netmask}}</td>
			</tr>
			<tr>
				<th>业务网关</th>
				<td>{{forms.service_gw}}</td>
			</tr>
			<tr>
				<th>选择系统</th>
				<td>{{forms.kickstart}}</td>
			</tr>
			<tr>
				<th>选择条带</th>
				<td>{{ forms.stripe }}</td>
			</tr>
			<tr>
				<th>选择磁盘</th>
				<td><input type="checkbox" id="all">反选</td>
			</tr>
			{% for d in disk %}
			<tr>
				<td><label><input type="checkbox" name="disk_zh" value="{{d.sotl}}">{{d.sotl}}--{{d.size}}</label></td>
			</tr>
			{% endfor %}
		</tbody>
		<button class="btn btn-info btn-sm" type="submit">确定</button>
	</table>
</form>